﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using C = System.Console;

namespace Edu.Console
{
    /// <summary>
    /// Playing card
    /// </summary>
    public abstract class Card
    {

        #region Properties

        public CardRank Rank { get; private set; }
        public CardSuit Suit { get; private set; }
        
        #endregion

        #region Constructors

        public Card()
        {

        }

        public Card(CardSuit suit) : this(suit, CardRank.R2) { }

        public Card(CardRank rank) : this(CardSuit.C, rank) { }

        public Card(CardRank rank, bool malicious = false)
            : this((CardSuit)100, rank)
        {

        }

        public Card(CardSuit suit, CardRank rank)
        {
            Suit = suit;
            Rank = rank;
            
        }

        #endregion

        public abstract string GetTitle();

        public virtual void Draw()
        {
            C.WriteLine(this.GetTitle());
        }
    }

    public enum CardSuit
    {
        P = 1, T, B, C
    }

    public enum CardRank
    {
        R2 = 2, R3, R4, R5, R6, R7, R8, R9, T, J, Q, K, A, JK
    }


}
